/**
 * 
 */
package pt.inescid.components.console.commands;

import pt.inescid.components.console.Console;

/**
 * @author Sergio Esteves (sesteves at gsd.inesc-id.pt)
 *
 */
public class ShowMaxStorageCommand extends Command {

	public static final String CMD_NAME = "show_max_storage";
	
	public ShowMaxStorageCommand(Console console) {
		super(console);
	}
	
	@Override
	public void execute(String[] args) throws CommandException {
		console.writeln(gridP2P.getMaxStorage() / 1048576 + " MB");
	}

	@Override
	public String getCmdName() {
		return CMD_NAME;
	}

	@Override
	public String synopsis() {
		return CMD_NAME + SYNTAX_SEPARATOR +
			"shows the maximum available space";
	}

}
